package com.hzdp.jvm;

import java.util.ArrayList;

/**
 * VM Args：-Xms20m -Xmx20m -XX:+HeapDumpOnOutOfMemoryError
 * 
 * @author liuming
 * 
 */
public class HeapOOM {

	static class OOMObject {
	}

	public static void main(String[] args) {
		ArrayList<OOMObject> arrayList = new ArrayList<OOMObject>();
		while (true) {
			arrayList.add(new OOMObject());
		}
	}
}
